﻿using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;

namespace DOM_X10
{
    class Tokken
    {
        public Tokken()
        {
            type = -1;
            subtype = -1;
            values = "";
            translate = "";
        }

        public enum tipos
        {
            Dispositivo = 0,
            Funcion,
            Valor
        };
        public Hashtable subtypes = new Hashtable()
        {
            {0  ,   "0000"},
            {1  ,   "0001"},
            {2  ,   "0010"},
            {3  ,   "0011"},
            {4  ,   "0100"},
            {5  ,   "0101"},
            {6  ,   "0110"},
            {7  ,   "0111"},
            {8  ,   "1000"},
            {9  ,   "1001"},
            {10 ,   "1010"},
            {11 ,   "1011"},
            {12 ,   "1100"},
            {13 ,   "1101"},
            {14 ,   "1110"},
            {15 ,   "1111"}
        };
        public Hashtable codes = new Hashtable
        {
             {1  , "0110"},  
             {2  , "1110"},  
             {3  , "0010"},  
             {4  , "1010"},  
             {5  , "0001"},  
             {6  , "1001"},  
             {7  , "0101"},  
             {8  , "1101"},  
             {9  , "0111"},  
             {10 , "1111"},  
             {11 , "0011"},  
             {12 , "1011"},  
             {13 , "0000"},  
             {14 , "1000"},  
             {15 , "0100"},  
             {16 , "1100"}
        };

        public String[] Funcion ={
            "All_Units_Off",
            "All_Lights_On",
            "On",
            "Off",
            "Dim",
            "Bright",
            "All_Lights_Off",
            "Extended_Code",
            "Hail_Request",
            "Hail_Acknowledge",
            "Pre_set_Dim_1",
            "Pre_set_Dim_2",
            "Extended_Data_Transfer",
            "Status_On",
            "Status_Off",
            "Status_Request"
        };
        private int type;
        private int subtype;
        private String values;
        private String translate;


        public int Type
        {
            get { return type; }
            set { type = value; }
        }
        public int Subtype
        {
            get { return subtype; }
            set { subtype = value; }
        }
        public String Value
        {
            get { return values; }
            set { values = value; }
        }
        public String Translate
        {
            get { return translate; }
            set { translate = value; }
        }

    }
}
